#include "head.h"
int pwdFunc(int sockfd) {
    int ifError;
    recv(sockfd, &ifError, sizeof(int), 0);
    if (ifError != 0) {
        // 接收一个小火车
        printf("pwd is error\n");
        return -1;
    }
    char buf[1024]={0};
    int length;
    recvn(sockfd,&length,sizeof(int));
    recvn(sockfd, buf, length);

    printf("result of pwd : current workingdir is %s\n", buf);
    printf("pwd is successful\n");
    return 0;

}
